<script setup lang="ts">
defineProps<{
  modelValue: number
  car: string
  house: string
}>()
const emit = defineEmits<{
  (e: 'update:modelValue', money: number): void
  (e: 'update:car', car: string): void
  (e: 'update:house', house: string): void
}>()
</script>

<template>
  <div class="childone-page">子组件</div>
  <div>钱包：{{ modelValue }}</div>
  <button @click="emit('update:modelValue', 20000)">搬砖一个月</button>
  <hr />
  <div>交通工具：{{ car }}</div>
  <button @click="emit('update:car', '劳斯莱斯')">换车换车</button>
  <hr />
  <div>起居住所：{{ house }}</div>
  <button @click="emit('update:house', '汤臣一品')">换房换房</button>
</template>

<style lang="scss" scoped></style>
